﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Paginas_Logado/MasterPageLogado.Master" AutoEventWireup="true" CodeBehind="ClienteAgendamento.aspx.cs" Inherits="WEB_MechSysWeb.Paginas_Logado.ClienteAgendamento" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        #divRdButtons {
            width: 288px;
            height: 34px;
            top: 0px;
        }

        .auto-style1 {
            width: 106px;
        }

        #divFiltroAgenda {
            height: 27px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderMaster" runat="server">

    <div id="divPagina" style="height: 1237px">
        <div id="divTitulo" class="divTituloPerfilDados">
            <asp:Image ID="imgIcone" runat="server" CssClass="imgIconTitulo" Height="25px" ImageUrl="~/Imagens/icon-agenda-de-eventos.png" Width="29px" />
            Agendamentos
        </div>
        <asp:UpdatePanel ID="UpdatePanelAgendamentos" runat="server">
            <ContentTemplate>
                <div id="divAgendamentos" class="divAgendamentos">
                    <div class="divHeaderCad">Agendamentos Realizados</div>
                    <div id="divFiltroAgenda">
                        <asp:Label ID="Label1" runat="server" Text="Informe a Data desejada: " ForeColor="Black" Font-Size="Medium"></asp:Label>
                        <asp:TextBox ID="txtDataFiltro" runat="server" Width="320px"></asp:TextBox>
                        <AjaxControlToolkit:MaskedEditExtender ID="mskDataFiltro" runat="server" TargetControlID="txtDataFiltro"
                            Mask="99\/99\/9999" ClearMaskOnLostFocus="false" PromptCharacter="_">
                        </AjaxControlToolkit:MaskedEditExtender>
                        <AjaxControlToolkit:CalendarExtender ID="CalendarExtenderFiltro" runat="server" TargetControlID="txtDataFiltro"
                            Format="dd/MM/yyyy">
                        </AjaxControlToolkit:CalendarExtender>
                        <asp:ImageButton ID="imgbtnPesquisar" runat="server" BorderColor="#3F3F3F" BorderStyle="Groove" BorderWidth="2px" Height="22px" ImageUrl="~/Imagens/Find.png" Width="26px" OnClick="imgbtnPesquisar_Click" />
                    </div>
                    <asp:GridView ID="gridAgendamentos" runat="server" Height="51px" Width="630px" AutoGenerateColumns="False" AutoGenerateSelectButton="True" BackColor="#F3F3F3" BorderColor="#333333" BorderStyle="Groove" BorderWidth="3px" DataKeyNames="AgendamentoID" OnSelectedIndexChanged="gridAgendamentos_SelectedIndexChanged" CssClass="gridAgend">
                        <AlternatingRowStyle BackColor="#CCCCCC" BorderColor="#333333" BorderStyle="Outset" BorderWidth="3px" ForeColor="Black" />
                        <Columns>
                            <asp:BoundField DataField="AgendamentoID" HeaderText="AgendamentoID" />
                            <asp:BoundField DataField="Veiculo" HeaderText="Veiculo" />
                            <asp:BoundField DataField="Placa" HeaderText="Placa" />
                            <asp:BoundField DataField="Status" HeaderText="Status" />
                            <asp:BoundField DataField="DataAgendada" HeaderText="DataAgendada" />
                            <asp:BoundField DataField="Turno" HeaderText="Turno" />
                        </Columns>
                        <HeaderStyle BackColor="#3F3F3F" ForeColor="White" />
                        <SelectedRowStyle BackColor="#3F3F3F" ForeColor="White" />
                    </asp:GridView>
                </div>
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="imgbtnPesquisar" EventName="Click" />
            </Triggers>
        </asp:UpdatePanel>
        <asp:UpdatePanel ID="UpdatePanel" runat="server">
            <ContentTemplate>
                <div id="divAgendar" class="divAgendar">
                    <div class="divHeaderCad">Fazer Agendamento</div>
                    <div style="height: 349px">
                        <div id="divCalendario" class="divCalendario">
                            <asp:Label ID="Label2" runat="server" Text="Selecione a Data:" CssClass="lblNomePerfil" Font-Size="Medium" ForeColor="White"></asp:Label>
                            <asp:Calendar ID="calendarAgenda" runat="server" CssClass="calendarAgenda" BackColor="White" Height="218px" Width="249px"></asp:Calendar>
                        </div>
                        <div id="divRdButtons" class="divRDButtons">

                            <asp:RadioButtonList ID="rdListTurno" runat="server" RepeatDirection="Horizontal"
                                Font-Size="Medium" ForeColor="White" Height="30px">
                                <asp:ListItem Value="M" Selected="True">Manhã</asp:ListItem>
                                <asp:ListItem Value="T">Tarde</asp:ListItem>
                            </asp:RadioButtonList>
                        </div>
                    </div>
                    <div id="divInfAgendamento" class="divInfAgendamento">
                        <table style="width: 86%; height: 212px; left: 0px;" class="tableDadosPerfilAgenda">
                            <tr>
                                <td class="auto-style1">
                                    <asp:Label ID="Label3" runat="server" Font-Size="Medium" ForeColor="White" Text="Veículo:"></asp:Label>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtVeiculo" runat="server" Height="22px" Width="330px" Enabled="False" Style="margin-bottom: 0px"></asp:TextBox>
                                    <asp:Button ID="btnSelecionaveiculo" runat="server" Text="..." CssClass="botaoSelecionaVeiculo" />
                                </td>
                            </tr>
                            <tr>
                                <td class="auto-style1">
                                    <asp:Label ID="Label4" runat="server" Font-Size="Medium" ForeColor="White" Text="Resumo:"></asp:Label>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtResumo" runat="server" Height="68px" TextMode="MultiLine" Width="355px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td class="auto-style1">
                                    <asp:Label ID="Label5" runat="server" Font-Size="Medium" ForeColor="White" Text="Descrição:"></asp:Label>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtDescricao" runat="server" Height="102px" TextMode="MultiLine" Width="355px"></asp:TextBox>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div id="divBotoes" class="divBotoesPerfilDadosAg">
                        <asp:Button ID="btnNovo" runat="server" CssClass="botoesPerfilDadosAg" ForeColor="White" Text="Novo" OnClick="btnNovo_Click" />
                        <asp:Button ID="btnEditar" runat="server" CssClass="botoesPerfilDadosAg" ForeColor="White" Text="Editar" OnClick="btnEditar_Click" />
                        <asp:Button ID="btnCancelar" runat="server" CssClass="botoesPerfilDadosAg" ForeColor="White" Text="Cancelar" OnClick="btnCancelar_Click" />
                        <asp:Button ID="btnExcluir" runat="server" CssClass="botoesPerfilDadosAg" ForeColor="White" Text="Excluir" OnClick="btnExcluir_Click" />
                        <asp:Button ID="btnSalvar" runat="server" CssClass="botoesPerfilDadosAg" ForeColor="White" Text="Salvar" OnClick="btnSalvar_Click" />
                    </div>
                </div>
                <asp:Panel ID="PnSelecionaVeiculo" runat="server">
                    <table style="width: 100%; height: 222px;" class="tableModal">
                        <tr>
                            <td class="style1">
                                <div class="divHeaderCad">
                                    Selecione o Veiculo
                            <asp:Button ID="btnFecharPVeiculo" runat="server" Text="Fechar" CssClass="botaoFecharPopUpV" />
                                </div>
                                <asp:GridView ID="gridSelecioneVeiculo" runat="server" Height="63px" Width="630px" AutoGenerateColumns="False" AutoGenerateSelectButton="True" BackColor="#F3F3F3" BorderColor="#333333" BorderStyle="Groove" BorderWidth="3px" DataKeyNames="VeiculoID" OnSelectedIndexChanged="gridSelecioneVeiculo_SelectedIndexChanged">
                                    <AlternatingRowStyle BackColor="#CCCCCC" BorderColor="#333333" BorderStyle="Outset" BorderWidth="3px" ForeColor="Black" />
                                    <Columns>
                                        <asp:BoundField DataField="VeiculoID" HeaderText="VeiculoID" />
                                        <asp:BoundField DataField="Placa" HeaderText="Placa" />
                                        <asp:BoundField DataField="Marca" HeaderText="Marca" />
                                        <asp:BoundField DataField="Modelo" HeaderText="Modelo" />
                                        <asp:BoundField DataField="AnoFab" HeaderText="Ano Fab" />
                                        <asp:BoundField DataField="AnoMod" HeaderText="Ano Mod" />
                                    </Columns>
                                    <HeaderStyle BackColor="#3F3F3F" ForeColor="White" />
                                    <SelectedRowStyle BackColor="#3F3F3F" ForeColor="White" />
                                </asp:GridView>
                            </td>
                        </tr>
                        <tr>
                            <td></td>
                        </tr>
                    </table>
                </asp:Panel>
                <AjaxControlToolkit:ModalPopupExtender
                    ID="PnSelecionaVeiculo_ModalPopupExtender"
                    runat="server"
                    Enabled="True"
                    TargetControlID="btnSelecionaVeiculo"
                    PopupControlID="PnSelecionaVeiculo"
                    DropShadow="true"
                    CancelControlID="btnFecharPVeiculo" />
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="btnNovo" EventName="Click" />
                <asp:AsyncPostBackTrigger ControlID="btnEditar" EventName="Click" />
                <asp:AsyncPostBackTrigger ControlID="btnCancelar" EventName="Click" />
            </Triggers>
        </asp:UpdatePanel>
    </div>
</asp:Content>
